﻿Imports System.Collections.ObjectModel
Imports GalaSoft.MvvmLight
Namespace FL_8x0.FL_830.Model
    Public Class ProductModel : Inherits ViewModelBase

        Private _id As String
        Private _name As String
        Private _model As String
        Private _code As String

        Private _times As ObservableCollection(Of Single)
        Private _limits As ObservableCollection(Of Single)

        Private _gpUnitIndex As UShort
        Private _leakUnitIndex As UShort

        '    Private _dly1 As Single
        '    Private _chg1 As Single
        '    Private _chg2 As Single
        '    Private _bal1 As Single
        '    Private _bal2 As Single
        '    Private _sdet As Single
        '    Private _ldet As Single
        '    Private _dly2 As Single
        '    Private _exh As Single
        '    Private _dly3 As Single
        '    Private _fitting As Single
        '
        '    Private _chg1ul As Single
        '    Private _chg1ll As Single
        '    Private _chg2ul As Single
        '    Private _chg2ll As Single
        '    Private _bngul As Single
        '    Private _bngll As Single
        '    Private _sngul As Single
        '    Private _sngll As Single
        '    Private _lngul As Single
        '    Private _lngll As Single
        '    Private _fngul As Single
        '    Private _fngll As Single

        Private _sOffsetEn As Boolean
        Private _sOffsetVal As Single
        Private _sLinearEn As Boolean
        Private _sLinearK As Single
        Private _sLinearB As Single
        Private _lOffsetEn As Boolean
        Private _lOffsetVal As Single
        Private _lLinearEn As Boolean
        Private _lLinearK As Single
        Private _lLinearB As Single

        Private _revEn As Boolean
        Private _revSave As Boolean
        Private _revUl As Single
        Private _revVal As Single
        Private _revWeight As Single
        Private _revNg As Single

        Private _fittingMode As UShort
        Private _fittingA As Single
        Private _fittingB As Single
        Private _fittingC As Single

        Private _workVal As Single
        Private _masterVal As Single
        Private _standLeak As Single
        Private _revCalc As Boolean

        Private _groupId As UShort



        Public Sub New()
            Dim timeList = New List(Of Single)
            For i = 0 To 10
                timeList.Add(0.0)
            Next
            _times = New ObservableCollection(Of Single)(timeList)

            Dim limitList = New List(Of Single)
            For i = 0 To 11
                limitList.Add(0.0)
            Next
            _limits = New ObservableCollection(Of Single)(limitList)

            _groupId = 1

        End Sub

        Public Property Id As String
            Get
                Return _id
            End Get
            Set
                _id = Value
            End Set
        End Property

        Public Property Name As String
            Get
                Return _name
            End Get
            Set
                _name = Value
            End Set
        End Property

        Public Property Model As String
            Get
                Return _model
            End Get
            Set
                _model = Value
            End Set
        End Property

        Public Property Code As String
            Get
                Return _code
            End Get
            Set
                _code = value
            End Set
        End Property

        Public Property Times As ObservableCollection(Of Single)
            Get
                Return _times
            End Get
            Set
                _times = Value
                RaisePropertyChanged()
            End Set
        End Property

        Public Property Limits As ObservableCollection(Of Single)
            Get
                Return _limits
            End Get
            Set
                _limits = Value
                RaisePropertyChanged()
            End Set
        End Property

        Public Property SOffsetEn As Boolean
            Get
                Return _sOffsetEn
            End Get
            Set
                _sOffsetEn = value
            End Set
        End Property

        Public Property SOffsetVal As Single
            Get
                Return _sOffsetVal
            End Get
            Set
                _sOffsetVal = value
            End Set
        End Property

        Public Property SLinearEn As Boolean
            Get
                Return _sLinearEn
            End Get
            Set
                _sLinearEn = value
            End Set
        End Property

        Public Property SLinearK As Single
            Get
                Return _sLinearK
            End Get
            Set
                _sLinearK = value
            End Set
        End Property

        Public Property SLinearB As Single
            Get
                Return _sLinearB
            End Get
            Set
                _sLinearB = value
            End Set
        End Property

        Public Property LOffsetEn As Boolean
            Get
                Return _lOffsetEn
            End Get
            Set
                _lOffsetEn = value
            End Set
        End Property

        Public Property LOffsetVal As Single
            Get
                Return _lOffsetVal
            End Get
            Set
                _lOffsetVal = value
            End Set
        End Property

        Public Property LLinearEn As Boolean
            Get
                Return _lLinearEn
            End Get
            Set
                _lLinearEn = value
            End Set
        End Property

        Public Property LLinearK As Single
            Get
                Return _lLinearK
            End Get
            Set
                _lLinearK = value
            End Set
        End Property

        Public Property LLinearB As Single
            Get
                Return _lLinearB
            End Get
            Set
                _lLinearB = value
            End Set
        End Property

        Public Property RevEn As Boolean
            Get
                Return _revEn
            End Get
            Set
                _revEn = value
            End Set
        End Property

        Public Property RevSave As Boolean
            Get
                Return _revSave
            End Get
            Set
                _revSave = value
            End Set
        End Property

        Public Property RevUl As Single
            Get
                Return _revUl
            End Get
            Set
                _revUl = value
            End Set
        End Property

        Public Property RevVal As Single
            Get
                Return _revVal
            End Get
            Set
                _revVal = value
            End Set
        End Property

        Public Property RevWeight As Single
            Get
                Return _revWeight
            End Get
            Set
                _revWeight = Value
            End Set
        End Property

        Public Property RevNg As Single
            Get
                Return _revNg
            End Get
            Set
                _revNg = Value
            End Set
        End Property

        Public Property FittingMode As UShort
            Get
                Return _fittingMode
            End Get
            Set
                _fittingMode = value
            End Set
        End Property

        Public Property FittingA As Single
            Get
                Return _fittingA
            End Get
            Set
                _fittingA = value
            End Set
        End Property

        Public Property FittingB As Single
            Get
                Return _fittingB
            End Get
            Set
                _fittingB = value
            End Set
        End Property

        Public Property FittingC As Single
            Get
                Return _fittingC
            End Get
            Set
                _fittingC = value
            End Set
        End Property

        Public Property WorkVal As Single
            Get
                Return _workVal
            End Get
            Set
                _workVal = value
            End Set
        End Property

        Public Property MasterVal As Single
            Get
                Return _masterVal
            End Get
            Set
                _masterVal = value
            End Set
        End Property

        Public Property StandLeak As Single
            Get
                Return _standLeak
            End Get
            Set
                _standLeak = value
            End Set
        End Property

        Public Property RevCalc As Boolean
            Get
                Return _revCalc
            End Get
            Set
                _revCalc = value
            End Set
        End Property

        Public Property GpUnitIndex As UShort
            Get
                Return _gpUnitIndex
            End Get
            Set(value As UShort)
                _gpUnitIndex = value
            End Set
        End Property

        Public Property LeakUnitIndex As UShort
            Get
                Return _leakUnitIndex
            End Get
            Set(value As UShort)
                _leakUnitIndex = value
            End Set
        End Property

        Public Property GroupId As UShort
            Get
                Return _groupId
            End Get
            Set
                _groupId = value
            End Set
        End Property
    End Class
End Namespace

